<template>

  <div>
    <ElTable :data="list" style="width: 100%" stripe border>
      <ElTableColumn prop="id" label="ID" width="180"></ElTableColumn>
      <ElTableColumn prop="url" label="api路径" width="350"></ElTableColumn>
      <ElTableColumn prop="param" label="参数" width="180"></ElTableColumn>
      <ElTableColumn prop="method" label="方法" width="180"></ElTableColumn>
      <ElTableColumn prop="info" label="接口描述" width="180"></ElTableColumn>
      <ElTableColumn prop="cb" label="返回值" width="180"></ElTableColumn>
    </ElTable>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import Api from '../../script/Api';
import { ElTable, ElTableColumn, ElButton } from 'element-plus';
import { useRouter } from 'vue-router';

const router = useRouter();
const em = ref([]);
const epigram = () => {
  Api.get('/', {}, (data) => {
    console.log('data', data);
    em.value = data.message;
  });
};

const page = ref({
  pn: 1,
  ps: 20,
});
const list = ref([]);
const query = () => {
  Api.get(`/api/query/${page.value.pn}/${page.value.ps}`, {}, (data) => {
    console.log('data', data);
    list.value = data.data;
  });
};

query();
</script>

<style scoped></style>
